package com.owc.controller.app;

import com.owc.domain.BaseResult;
import com.owc.domain.dto.BannerDTO;
import com.owc.service.app.BannerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.data.web.SortDefault;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static org.springframework.data.domain.Sort.Direction.DESC;

/**
 * @Author xiaom
 * @Date 2020/2/24 14:59
 * @Version 1.0.0
 * @Description <>
 **/
@RestController
@RequestMapping("/investment")
@Api(tags = "(APP-V2)banner管理")
public class BannerController {

    private final BannerService bannerService;

    public BannerController(BannerService bannerService) {
        this.bannerService = bannerService;
    }

    @PostMapping(value = "/getBannerList")
    @ApiOperation("获取投资面板banner图列表")
    public BaseResult<List<BannerDTO>> getBannerList(){
        return BaseResult.success(bannerService.getBannerList());
    }

}
